<?php if (count($dataBanners)) { ?>
    <?php if ($position == 1) { ?>
        <div id="slider" class="nivoSlider">
            <?php foreach ($dataBanners as $banner) { ?>
                <?php $imgBanner = $banner->image ? Helper::renderImage($banner->image, 'uploads/resizeOnIndex/' . $model, ',', false, true) : '/uploads/no_image.gif'; ?>
                <?php $bannerInfo[] = array(
                    'alias' => $banner->alias,
                    'info' => $banner->info
                ) ?>
                <a href="<?php echo $banner->page_link; ?>" title="<?php echo $banner->name; ?>">
                    <img src="<?php echo $imgBanner; ?>" alt="<?php echo $banner->name; ?>" title="#htmlcaption-<?php echo $banner->alias; ?>" />
                </a>
            <?php } ?>
        </div>

        <?php foreach ($bannerInfo as $info) { ?>
            <div id="htmlcaption-<?php echo $info['alias']; ?>" class="nivo-html-caption">
                <?php echo nl2br($info['info']); ?>
            </div>
        <?php } ?>
    <?php } else { ?>
        <ul>
            <?php foreach ($dataBanners as $banner) { ?>
                <?php $imgBanner = $banner->image ? Helper::renderImage($banner->image, 'uploads/resizeBanner/Banner', ',', false, true, true) : '/uploads/no_image.gif'; ?>
                <?php
                    $explodeFolder = explode('/', $imgBanner);
                    $imgStrReplace = '';
                    if ($explodeFolder[2] != 'no_image.gif') {
                        $imgStrReplace = str_replace($explodeFolder[2], 'original', $imgBanner);
                    }
                ?>
                <li>
                    <a href="<?php echo $imgStrReplace; ?>" title="<?php echo $banner->name; ?>" class = 'cloud-zoom' rel="transparentImage: '', useWrapper: false, showTitle: true, zoomWidth:'400', zoomHeight:'300', adjustY:0, adjustX:10"><img class="zoomImg" src="<?php echo $imgBanner; ?>" alt="<?php echo $banner->name; ?>" /></a></li>
            <?php } ?>
        </ul>
    <?php } ?>
<?php }